﻿using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.ComponentModel;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Media;
using LiveChartsCore;
using LiveChartsCore.Defaults;
using LiveChartsCore.Measure;
using LiveChartsCore.SkiaSharpView;
using LiveChartsCore.SkiaSharpView.Painting;
using LiveChartsCore.SkiaSharpView.WPF;
using LiveChartsCore.Themes;
using SkiaSharp;

namespace OneRed.Draw.LVCDraw
{
    public class DrawBaseMap // : INotifyPropertyChanged
    {
        private string sMapType;//所绘图谱类型
        private List<ISeries> Series;
        //柱图
        private static ColumnSeries<double> ColumSeriesDoub;
        //拆线图
        private static LineSeries<double> LineseriesDoub;
        //生命周期图
        private static LineSeries<WeightedPointString> lineseriesCircl;
        //饼图
        private static PieSeries<double> PieSeries;
        //父容器
        private CartesianChart Continer;

        //x座标对象容器
        private List<Axis> ListXAxes;
        private List<Axis> ListYAxes;
        //X座标
        private Axis CooX;
        //Y座标
        private Axis CooY;
        /// <summary>
        /// 构造函数
        /// </summary>
        /// <param name="blCircle">是否为生命周期图</param>
        public DrawBaseMap(string btName)
        {
            sMapType = btName;
            switch (sMapType)
            {
                case "baseBar":
                    {
                        //柱图
                        ColumSeriesDoub = new ColumnSeries<double>();
                        Series = new List<ISeries> { ColumSeriesDoub };
                        break;
                    }
                case "baseLine":
                    {
                        //拆线图
                        LineseriesDoub = new LineSeries<double>();
                        Series = new List<ISeries> { LineseriesDoub };
                        break;
                    }
                case "basePie":
                    {
                        //饼图
                        PieSeries = new PieSeries<double>();
                        Series = new List<ISeries> { PieSeries };
                        break;
                    }
                case "lifeCircle":
                    {
                        //生命周期图
                        lineseriesCircl = new LineSeries<WeightedPointString>();
                        Series = new List<ISeries> { lineseriesCircl };
                        break;
                    }
                default:
                    {
                        break;
                    }
            }

            CooX = new Axis();
            CooY = new Axis();
            ListXAxes = new List<Axis> { CooX };
            ListYAxes = new List<Axis> { CooY };
        }

        //slYears//第一个值为年度，第二个值为数量（多个数值用|分开），为了更好的将标签值也同步传入，默认第一组值为（0，"d1|d2"）
        public void DrawMap(CartesianChart Continer, PieChart PCContiner, string btName, SortedList<string, string> slYears, SortedList<string, string> slTitle)
        {
            this.Continer = Continer;
            //判断是否是生命周期图，如果是则对数据进行处理
            //List<string> lsYears = new();           
            string sXNmae = slTitle.Keys[0];//传入的X轴的值
            string[] sSeriesName = slTitle.Values[0].Split('|');//系列值 如果数组长度为1则仅一个系列，如果大于1由有多个系列

            List<string> lsYears = new List<string>();//x标签值
            double[][] lsValue = new double[sSeriesName.Length][];//定义一个二维矩阵//()
            //再根据数据项定义每行的的数量
            for (int iS = 0; iS < sSeriesName.Length; iS++)
            {
                lsValue[iS] = new double[slYears.Count];
            }

            for (int iv = 0; iv < slYears.Count; iv++)
            {
                lsYears.Add(slYears.Keys[iv]);
                var vluestemp = slYears.Values[iv].Split('|');
                for (int ir = 0; ir < sSeriesName.Length; ir++)
                {
                    lsValue[ir][iv] = double.Parse(vluestemp[ir]);
                }
            }

            sMapType = btName;

            Continer.TooltipPosition = TooltipPosition.Left;//显示标签
            switch (sMapType)
            {
                case "baseBar":
                    {
                        CooX.Name = sXNmae;
                        CooX.Labels = lsYears;

                        ColumSeriesDoub.Values = lsValue[0];
                        ColumSeriesDoub.Name = sSeriesName[0];
                        ColumSeriesDoub.DataLabelsPaint = null;
                        ColumSeriesDoub.DataLabelsPaint = new SolidColorPaint(new SKColor(45, 45, 45));
                        ColumSeriesDoub.DataLabelsSize = 14;
                        ColumSeriesDoub.DataLabelsPosition = DataLabelsPosition.End;

                        if (sSeriesName.Length > 1)
                        {
                            for (int iss = 1; iss < sSeriesName.Length; iss++)
                            {
                                ColumSeriesDoub = new ColumnSeries<double>();
                                ColumSeriesDoub.Values = lsValue[iss];
                                ColumSeriesDoub.Name = sSeriesName[iss];

                                ColumSeriesDoub.DataLabelsPaint = null;
                                ColumSeriesDoub.DataLabelsPaint = new SolidColorPaint(new SKColor(45, 45, 45));
                                ColumSeriesDoub.DataLabelsSize = 14;
                                ColumSeriesDoub.DataLabelsPosition = DataLabelsPosition.End;

                                Series.Add(ColumSeriesDoub);
                            }
                        }

                        //Continer.LegendPosition = LegendPosition.Top;
                        //SolidColorBrush mySolidColorBrush = new SolidColorBrush();
                        //mySolidColorBrush.Color = System.Windows.Media.Color.FromArgb(0, 0, 0, 255);
                        //Continer.LegendBackground = mySolidColorBrush;

                        Continer.Series = Series;
                        Continer.XAxes = ListXAxes;
                        Continer.YAxes = ListYAxes;
                        break;
                    }
                case "baseLine":
                    {
                        CooX.Name = sXNmae;
                        CooX.Labels = lsYears;

                        LineseriesDoub.Values = lsValue[0];
                        LineseriesDoub.Name = sSeriesName[0];
                        LineseriesDoub.DataLabelsPaint = null;
                        LineseriesDoub.DataLabelsPaint = new SolidColorPaint(new SKColor(45, 45, 45));
                        LineseriesDoub.DataLabelsSize = 14;
                        LineseriesDoub.DataLabelsPosition = DataLabelsPosition.End;
                        if (sSeriesName.Length > 1)
                        {
                            for (int iss = 1; iss < sSeriesName.Length; iss++)
                            {
                                LineseriesDoub = new LineSeries<double>();
                                LineseriesDoub.Values = lsValue[iss];
                                LineseriesDoub.Name = sSeriesName[iss];

                                LineseriesDoub.DataLabelsPaint = null;
                                LineseriesDoub.DataLabelsPaint = new SolidColorPaint(new SKColor(45, 45, 45));
                                LineseriesDoub.DataLabelsSize = 14;
                                LineseriesDoub.DataLabelsPosition = DataLabelsPosition.End;

                                Series.Add(LineseriesDoub);
                            }
                        }
                        //Continer.LegendPosition = LegendPosition.Top;
                        //SolidColorBrush mySolidColorBrush = new SolidColorBrush();
                        //mySolidColorBrush.Color = System.Windows.Media.Color.FromArgb(0, 0, 0, 255);
                        //Continer.LegendBackground = mySolidColorBrush;

                        Continer.Series = Series;
                        Continer.XAxes = ListXAxes;
                        Continer.YAxes = ListYAxes;
                        break;
                    }
                case "basePie":
                    {
                        PieSeries.Values = new List<double> { lsValue[0][0], lsValue[1][0] };
                        PieSeries.Name = lsYears[0];
                        PieSeries.DataLabelsPaint = null;
                        PieSeries.DataLabelsPaint = new SolidColorPaint(new SKColor(45, 45, 45));
                        PieSeries.DataLabelsSize = 14;
                        PieSeries.DataLabelsPosition = PolarLabelsPosition.Middle;
                        PieSeries.Pushout = 8;

                        if (lsYears.Count > 1)
                        {
                            for (int iyear = 1; iyear < lsYears.Count; iyear++)
                            {
                                PieSeries = new PieSeries<double>();
                                PieSeries.Values = new List<double> { lsValue[0][iyear], lsValue[1][iyear] };

                                PieSeries.Name = lsYears[iyear];
                                PieSeries.DataLabelsPaint = null;
                                PieSeries.DataLabelsPaint = new SolidColorPaint(new SKColor(45, 45, 45));
                                PieSeries.DataLabelsSize = 14;
                                PieSeries.DataLabelsPosition = PolarLabelsPosition.Middle;
                                PieSeries.Pushout = 8;

                                Series.Add(PieSeries);
                            }

                        }
                        PCContiner.Series = Series;
                        break;
                    }
                case "lifeCircle":
                    {
                        //生命周期图
                        if (sSeriesName.Length != 2)
                            return;
                        Continer.TooltipPosition = TooltipPosition.Hidden;//隐藏标签

                        CooX.Name = sSeriesName[0];

                        CooY.Name = sSeriesName[1];

                        var CirclData = new ObservableCollection<WeightedPointString>();
                        for (int ic = 0; ic < lsValue[0].Length; ic++)
                        {
                            CirclData.Add(new WeightedPointString(lsValue[0][ic], lsValue[1][ic], lsYears[ic]));
                        }

                        lineseriesCircl.Values = CirclData;
                        //lineseries.Name = "年度thesis num";
                        lineseriesCircl.Fill = null;
                        lineseriesCircl.LineSmoothness = 0;
                        lineseriesCircl.DataLabelsPaint = null;
                        lineseriesCircl.DataLabelsPaint = new SolidColorPaint(new SKColor(45, 45, 45));
                        lineseriesCircl.DataLabelsSize = 14;
                        lineseriesCircl.DataLabelsPosition = DataLabelsPosition.End;

                        Continer.LegendPosition = LegendPosition.Hidden;

                        Continer.Series = Series;
                        Continer.XAxes = ListXAxes;
                        Continer.YAxes = ListYAxes;
                        break;
                    }
                default:
                    {
                        break;
                    }
            }
        }

        public async Task ChageEdgeStroke(int iEdgeBorder, SKColor color)
        {
            switch (sMapType)
            {
                case "baseBar":
                    {
                        float iBorder = (ColumSeriesDoub.Stroke is null) ? 0 : ColumSeriesDoub.Stroke.StrokeThickness;
                        await Task.Run(() =>
                        {
                            bool blfirst = true;
                            foreach (var vLineSeri in Series)
                            {
                                if (blfirst)
                                {
                                    (vLineSeri as ColumnSeries<double>).Stroke = new SolidColorPaint(color) { StrokeThickness = iBorder + iEdgeBorder };
                                    SKColor drawingColor = new SKColor(color.Red, color.Green, color.Blue, (byte)(color.Alpha * 0.4));
                                    (vLineSeri as ColumnSeries<double>).Fill = new SolidColorPaint(drawingColor);
                                    blfirst = false;
                                }
                                else
                                {
                                    SKColor drawingColor = new SKColor((byte)(250 - color.Red), (byte)(250 - color.Green), (byte)(250 - color.Blue), color.Alpha);
                                    (vLineSeri as ColumnSeries<double>).Stroke = new SolidColorPaint(drawingColor) { StrokeThickness = iBorder + iEdgeBorder };
                                    drawingColor = new SKColor((byte)(250 - color.Red), (byte)(250 - color.Green), (byte)(250 - color.Blue), (byte)(color.Alpha * 0.4));
                                    (vLineSeri as ColumnSeries<double>).Fill = new SolidColorPaint(drawingColor);
                                }
                            }

                        });
                        break;
                    }
                case "baseLine":
                    {
                        float iBorder = LineseriesDoub.Stroke.StrokeThickness;
                        await Task.Run(() =>
                        {
                            //LineseriesDoub.Stroke = new SolidColorPaint(color) { StrokeThickness = iBorder + iEdgeBorder };
                            //SKColor drawingColor = new SKColor(color.Red, color.Green, color.Blue, (byte)(color.Alpha * 0.5));
                            //LineseriesDoub.Fill = new SolidColorPaint(drawingColor);

                            bool blfirst = true;
                            foreach (var vLineSeri in Series)
                            {
                                if (blfirst)
                                {
                                    (vLineSeri as LineSeries<double>).Stroke = new SolidColorPaint(color) { StrokeThickness = iBorder + iEdgeBorder };
                                    SKColor drawingColor = new SKColor(color.Red, color.Green, color.Blue, (byte)(color.Alpha * 0.4));
                                    (vLineSeri as LineSeries<double>).Fill = new SolidColorPaint(drawingColor);
                                    blfirst = false;
                                }
                                else
                                {
                                    SKColor drawingColor = new SKColor((byte)(250 - color.Red), (byte)(250 - color.Green), (byte)(250 - color.Blue), color.Alpha);
                                    (vLineSeri as LineSeries<double>).Stroke = new SolidColorPaint(drawingColor) { StrokeThickness = iBorder + iEdgeBorder };
                                    drawingColor = new SKColor((byte)(250 - color.Red), (byte)(250 - color.Green), (byte)(250 - color.Blue), (byte)(color.Alpha * 0.4));
                                    (vLineSeri as LineSeries<double>).Fill = new SolidColorPaint(drawingColor);
                                }
                            }

                        });
                        break;
                    }
                case "basePie":
                    {
                        //float iBorder = (PieSeries.Stroke is null) ? 0 : PieSeries.Stroke.StrokeThickness;
                        //await Task.Run(() =>
                        //{
                        //    bool blfirst = true;
                        //    foreach (var vLineSeri in Series)
                        //    {
                        //        if (blfirst)
                        //        {
                        //            (vLineSeri as PieSeries<double>).Stroke = new SolidColorPaint(color) { StrokeThickness = iBorder + iEdgeBorder };
                        //            SKColor drawingColor = new SKColor(color.Red, color.Green, color.Blue, (byte)(color.Alpha * 0.4));
                        //            (vLineSeri as PieSeries<double>).Fill = new SolidColorPaint(drawingColor);
                        //            blfirst = false;
                        //        }
                        //        else
                        //        {
                        //            SKColor drawingColor = new SKColor((byte)(250 - color.Red), (byte)(250 - color.Green), (byte)(250 - color.Blue), color.Alpha);
                        //            (vLineSeri as PieSeries<double>).Stroke = new SolidColorPaint(drawingColor) { StrokeThickness = iBorder + iEdgeBorder };
                        //            drawingColor = new SKColor((byte)(250 - color.Red), (byte)(250 - color.Green), (byte)(250 - color.Blue), (byte)(color.Alpha * 0.4));
                        //            (vLineSeri as PieSeries<double>).Fill = new SolidColorPaint(drawingColor);
                        //        }
                        //    }

                        //});
                        break;
                    }
                case "lifeCircle":
                    {
                        //生命周期图
                        //lineseriesCircl.Stroke = new SolidColorPaintTask(new SKColor(color.R, color.G, color.B)) { StrokeThickness = 10 };
                        float iBorder = lineseriesCircl.Stroke.StrokeThickness;
                        await Task.Run(() => { lineseriesCircl.Stroke = new SolidColorPaint(color) { StrokeThickness = iBorder + iEdgeBorder }; });
                        //await Task.Run(()=>{ lineseriesCircl.Stroke = new SolidColorPaintTask(new SKColor(color.R, color.G, color.B)) { StrokeThickness = 10 }; });
                        break;
                    }
                default:
                    {
                        break;
                    }
            }
        }
        public async Task ChageNodeStroke(int iNodeSize, SKColor color)
        {
            switch (sMapType)
            {
                case "baseBar":
                    break;
                case "baseLine":
                    {
                        double iBorder = LineseriesDoub.GeometrySize;

                        await Task.Run(() =>
                        {
                            bool blfirst = true;
                            foreach (var vLineSeri in Series)
                            {
                                if (blfirst)
                                {
                                    (vLineSeri as LineSeries<double>).GeometryStroke = new SolidColorPaint() { Color = color, StrokeThickness = 5 };
                                    blfirst = false;
                                }
                                else
                                {
                                    SKColor drawingColor = new SKColor((byte)(250 - color.Red), (byte)(250 - color.Green), (byte)(250 - color.Blue), color.Alpha);
                                    (vLineSeri as LineSeries<double>).GeometryStroke = new SolidColorPaint() { Color = drawingColor, StrokeThickness = 5 };
                                }
                                //LineseriesDoub.GeometryFill = null;//让节点内部填充为空
                                (vLineSeri as LineSeries<double>).GeometrySize = iBorder + iNodeSize;
                            }
                            //LineseriesDoub.GeometryStroke = new SolidColorPaint() { Color = color, StrokeThickness = 5};
                            ////LineseriesDoub.GeometryFill = null;//让节点内部填充为空
                            //LineseriesDoub.GeometrySize = iBorder + iNodeSize;
                        });
                        break;
                    }
                case "basePie":
                    break;
                case "lifeCircle":
                    {
                        ////生命周期图
                        ////lineseriesCircl.Stroke = new SolidColorPaintTask(new SKColor(color.R, color.G, color.B)) { StrokeThickness = 10 };
                        //float iBorder = lineseriesCircl.Stroke.StrokeThickness;
                        //await Task.Run(() => { lineseriesCircl.Stroke = new SolidColorPaint(color) { StrokeThickness = iBorder + iNodeSize }; });

                        double iBorder = lineseriesCircl.GeometrySize;
                        await Task.Run(() =>
                        {
                            lineseriesCircl.GeometryStroke = new SolidColorPaint() { Color = color, StrokeThickness = 5 };
                            //LineseriesDoub.GeometryFill = null;//让节点内部填充为空
                            lineseriesCircl.GeometrySize = iBorder + iNodeSize;
                        });
                        break;
                    }
                default:
                    {
                        break;
                    }
            }
        }

        public async Task ChageLabelStroke(int iNodeSize, SKColor color)
        {
            switch (sMapType)
            {
                case "baseBar":
                    {
                        //private static ColumnSeries<double> ColumSeriesDoub;
                        double iBorder = ColumSeriesDoub.DataLabelsSize;

                        await Task.Run(() =>
                        {
                            bool blfirst = true;
                            foreach (var vLineSeri in Series)
                            {
                                if (blfirst)
                                {
                                    (vLineSeri as ColumnSeries<double>).DataLabelsPaint = new SolidColorPaint(color);
                                    blfirst = false;
                                }
                                else
                                {
                                    SKColor drawingColor = new SKColor((byte)(250 - color.Red), (byte)(250 - color.Green), (byte)(250 - color.Blue), color.Alpha);
                                    (vLineSeri as ColumnSeries<double>).DataLabelsPaint = new SolidColorPaint(drawingColor);
                                }
                                //LineseriesDoub.GeometryFill = null;//让节点内部填充为空
                                (vLineSeri as ColumnSeries<double>).DataLabelsSize = iBorder + iNodeSize;
                            }
                            //LineseriesDoub.GeometryStroke = new SolidColorPaint() { Color = color, StrokeThickness = 5};
                            ////LineseriesDoub.GeometryFill = null;//让节点内部填充为空
                            //LineseriesDoub.GeometrySize = iBorder + iNodeSize;
                        });
                        break;
                    }
                case "baseLine":
                    {
                        double iBorder = LineseriesDoub.DataLabelsSize;

                        await Task.Run(() =>
                        {
                            bool blfirst = true;
                            foreach (var vLineSeri in Series)
                            {
                                if (blfirst)
                                {
                                    (vLineSeri as LineSeries<double>).DataLabelsPaint = new SolidColorPaint(color);
                                    blfirst = false;
                                }
                                else
                                {
                                    SKColor drawingColor = new SKColor((byte)(250 - color.Red), (byte)(250 - color.Green), (byte)(250 - color.Blue), color.Alpha);
                                    (vLineSeri as LineSeries<double>).DataLabelsPaint = new SolidColorPaint(drawingColor);
                                }
                                //LineseriesDoub.GeometryFill = null;//让节点内部填充为空
                                (vLineSeri as LineSeries<double>).DataLabelsSize = iBorder + iNodeSize;
                            }
                            //LineseriesDoub.GeometryStroke = new SolidColorPaint() { Color = color, StrokeThickness = 5};
                            ////LineseriesDoub.GeometryFill = null;//让节点内部填充为空
                            //LineseriesDoub.GeometrySize = iBorder + iNodeSize;
                        });
                        break;
                    }
                case "basePie":
                    {
                        //private static PieSeries<double> PieSeries;

                        double iBorder = PieSeries.DataLabelsSize;

                        await Task.Run(() =>
                        {
                            foreach (var vLineSeri in Series)
                            {

                                (vLineSeri as PieSeries<double>).DataLabelsPaint = new SolidColorPaint(color);
                                (vLineSeri as PieSeries<double>).DataLabelsSize = iBorder + iNodeSize;
                            }
                        });
                        break;
                    }
                case "lifeCircle":
                    {
                        ////生命周期图
                        ////lineseriesCircl.Stroke = new SolidColorPaintTask(new SKColor(color.R, color.G, color.B)) { StrokeThickness = 10 };
                        //float iBorder = lineseriesCircl.Stroke.StrokeThickness;
                        //await Task.Run(() => { lineseriesCircl.Stroke = new SolidColorPaint(color) { StrokeThickness = iBorder + iNodeSize }; });
                        ////await Task.Run(()=>{ lineseriesCircl.Stroke = new SolidColorPaintTask(new SKColor(color.R, color.G, color.B)) { StrokeThickness = 10 }; });

                        double iBorder = lineseriesCircl.DataLabelsSize;

                        await Task.Run(() =>
                        {
                            lineseriesCircl.DataLabelsPaint = new SolidColorPaint(color);
                            lineseriesCircl.DataLabelsSize = iBorder + iNodeSize;
                        });

                        break;
                    }
                default:
                    {
                        break;
                    }
            }
        }

        #region 原静态方法，但存在每次重新生成系列或绘图错误的现象
        ////系列的容器，通过add添加子系列，并可与界面进行绑定
        //private static List<ISeries> ListSeries = new List<ISeries> { lineseriesInt };
        ////拆线的对象
        //private static LineSeries<int> lineseriesInt = new LineSeries<int>();
        ////x座标对象容器
        //private static List<Axis> ListXAxes = new List<Axis>();
        //private static List<Axis> ListYAxes = new List<Axis>();
        ////X座标
        //private static Axis coox = new Axis();
        ////Y座标
        //private static Axis cooy = new Axis();

        //private static LineSeries<WeightedPointString> lineseriesCircl = new LineSeries<WeightedPointString>();

        //public static void DawMap(CartesianChart Continer, string btName, SortedList<string, int> slYears)
        //{
        //    List<string> lsYears = new();
        //    List<int> lsValue = new List<int>();
        //    foreach (var kp in slYears)
        //    {
        //        lsYears.Add(kp.Key);
        //        lsValue.Add(kp.Value);
        //    }

        //    switch (btName)
        //    {
        //        case "baseLine":
        //            {
        //                Continer.TooltipPosition = TooltipPosition.Left;//显示标签

        //                coox.Name = "Years";
        //                coox.Labels = lsYears;
        //                ListXAxes.Clear();
        //                ListXAxes.Add(coox);
        //                Continer.XAxes = null;
        //                Continer.XAxes = ListXAxes;

        //                //cooy.Name = null;
        //                //cooy.Labels = null;
        //                //ListYAxes.Clear();
        //                Continer.YAxes = null;

        //                lineseriesInt.Values = null;
        //                lineseriesInt.Values = lsValue;
        //                //lineseries.Name = "年度thesis num";
        //                //lineseriesInt.Fill = null;
        //                lineseriesInt.DataLabelsPaint = null;
        //                lineseriesInt.DataLabelsPaint = new SolidColorPaintTask(new SKColor(45, 45, 45));
        //                lineseriesInt.DataLabelsSize = 14;
        //                lineseriesInt.DataLabelsPosition = DataLabelsPosition.End;
        //                ListSeries.Clear();
        //                ListSeries.Add(lineseriesInt);
        //                //ListSeries = new List<ISeries> { lineseriesInt };
        //                Continer.Series = null;
        //                Continer.Series = ListSeries;

        //                break;
        //            }
        //        case "lifeCircle":
        //            {
        //                Continer.TooltipPosition = TooltipPosition.Hidden;//隐藏标签

        //                coox.Name = "Years";
        //                ListXAxes.Clear();
        //                ListXAxes.Add(coox);
        //                Continer.XAxes = null;
        //                Continer.XAxes = ListXAxes;

        //                cooy.Name = "人员\uD835\uDD46";
        //                ListYAxes.Clear();
        //                ListYAxes.Add(cooy);
        //                Continer.YAxes = null;
        //                Continer.YAxes = ListYAxes;


        //                var lineseries1 = new ObservableCollection<WeightedPointString>
        //                        {
        //                            new WeightedPointString(0, 0, "2017"), // Jan
        //                            new WeightedPointString(1, 1, "2018"), // Feb
        //                            new WeightedPointString(0, 2, "2019"), // Mar
        //                            new WeightedPointString(3, 3, "2020"), // Apr
        //                            new WeightedPointString(4, 4, "2021"), // May
        //                            new WeightedPointString(3, 5, "2022"), // Jun

        //                        };

        //                //lineseriesCircl = new LineSeries<WeightedPointString>();
        //                lineseriesCircl.Values = null;
        //                lineseriesCircl.Values = lineseries1;
        //                //lineseries.Name = "年度thesis num";
        //                lineseriesCircl.Fill = null;
        //                lineseriesCircl.DataLabelsPaint = null;
        //                lineseriesCircl.DataLabelsPaint = new SolidColorPaintTask(new SKColor(45, 45, 45));
        //                lineseriesCircl.DataLabelsSize = 14;
        //                lineseriesCircl.DataLabelsPosition = DataLabelsPosition.End;


        //                ListSeries.Clear();
        //                ListSeries.Add(lineseriesCircl);
        //                Continer.Series = null;
        //                Continer.Series = ListSeries;
        //                break;
        //            }

        //        //case "baseBar":
        //        //    {
        //        //        lvcDraw("LineSeries");
        //        //        break;
        //        //    }
        //        //case "basePie":
        //        //    {
        //        //        lvcDraw("LineSeries");
        //        //        break;
        //        //    }
        //        default:
        //            {
        //                break;
        //            }
        //    }
        //}
        #endregion
    }
}
